home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / BASIC / 2823.ZIP / ROSES.BAS < prev    next >
BASIC Source File  |  1990-08-21  |  1KB  |  39 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |          GRAFWIZ  Copyright (c) 1990  Thomas G. Hanlin III           |
  4. '   |                                                                      |
  5. '   |               The Graphics Wizard's Library for BASIC                |
  6. '   |                                                                      |
  7. '   +----------------------------------------------------------------------+
  8.  
  9.    REM $INCLUDE: 'GRAFWIZ.BI'
  10.  
  11.    ' Note: we don't use DEFINT because we need single precision!
  12.  
  13.    PI! = 3.141593
  14.    TotalRadius! = 40
  15.    G2Mode 1                       ' 640x200 CGA
  16.  
  17.    DO
  18.       G2Cls
  19.       G2Write "How many petals would you like (1-9) ? "
  20.       DO
  21.          ky$ = INKEY$
  22.       LOOP UNTIL LEN(ky$)
  23.       IF ky$ > "0" AND ky$ <= "9" THEN
  24.          G2Write ky$
  25.          Petals! = VAL(ky$)
  26.          FOR Angle! = 0! TO PI * 2! STEP .01
  27.             R! = 20 * COS(Petals! * Angle!)
  28.             G2Plot CINT(R! * COS(Angle!) + 310), CINT(R! * SIN(Angle!) + 100)
  29.          NEXT
  30.          G2Locate 24, 1
  31.          G2Write "Like to try another? "
  32.          DO
  33.             ky$ = INKEY$
  34.          LOOP UNTIL LEN(ky$)
  35.       END IF
  36.    LOOP WHILE UCASE$(ky$) = "Y"
  37.    G2Mode 0
  38.  
  39.